<template>
  <div class='meetings-add'>
    <div class="meetings-nt">
      <div v-for="(item,index) in meetingsData">
        <span class="meetings-label">{{item.label}}：</span>
        <el-input v-if="item.type=='input'" v-model="info[item.key]" clearable placeholder="请输入内容"></el-input>
        <el-date-picker v-else-if="item.type=='date'" v-model="info[item.key]" type="datetime" placeholder="选择日期时间" default-time="09:00:00">
        </el-date-picker>
      </div>
      <div>
        <el-button v-for="(item,index) in btnsData" v-if="item.show" :title="item.label" :key="index" :type="item.type" class="btn-add fr" @click="item.click">{{item.label}}</el-button>
      </div>
    </div>
    <div class="meetings-tab">
      <Tabs :showSearch="showSearch"></Tabs>
    </div>
  </div>
</template>
<script>
import Tabs from './tabs/tabs'
export default {
  components: {Tabs},
  name: "",
  data() {
    return {
      info:{
        meetName:"",
        meetDate:"",
      },
      meetingsData: [
        { key: "meetName", label: "会议名称", type: "input" },
        { key: "meetDate", label: "会议时间", type: "date" }
      ],
      btnsData:[
        // { label: "保存会议", type: "primary", click: this.save, show:this.showSearch},
        { label: "返回", type: "primary", click: this.doback, show:true}
      ],
      meetingInfo: {},

      showSearch:false,
    };
  },
  methods: {
    save(){

    },
    doback(){
      this.$router.go(-1)
    },
  },
  created() {
    // this.getDetail()
    this.$nextTick(()=>{
      this.$set(this.info,'meetName',this.$store.state.records.meetingInfo.meetName)
      this.$set(this.info,'meetDate',this.$store.state.records.meetingInfo.meetDate)
    })
  }
};
</script>
<style lang="scss" scoped>
.meetings-add {
  padding: 0 20px;
  box-sizing: border-box;
  flex-grow: 1;
  display: flex;
  flex-direction: column;

  .meetings-nt {
    margin: 15px 0;
    display: flex;
    min-height: 40px;

    > div {
      display: flex;
      margin-right: 20px;
    }
  }
  .meetings-label {
    display: inline-block;
    width: 80px;
    font-size: 14px;
    line-height: 40px;
    text-align: center;
  }
  .meetings-tab{
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }

  .btn-add{
    margin-right: 20px;
    padding: 0 25px;
  }
}
</style>